﻿using System;
using System.Collections.Generic;
using SharpSqlAnalyzer.nodes;
using SharpSqlAnalyzer.nodes.oracle;

namespace SharpSqlAnalyzer.stmt.oracle
{
	// Token: 0x0200012C RID: 300
	public class TCompoundTriggerBody : TCommonStoredProcedureSqlStatement
	{
		// Token: 0x060009A7 RID: 2471 RVA: 0x00303B21 File Offset: 0x00301D21
		public TCompoundTriggerBody() : this(EDbVendor.dbvoracle)
		{
		}

		// Token: 0x060009A8 RID: 2472 RVA: 0x00303B2B File Offset: 0x00301D2B
		public TCompoundTriggerBody(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.sstOracleCompoundTriggerBody;
		}

		// Token: 0x060009A9 RID: 2473 RVA: 0x00303B3F File Offset: 0x00301D3F
		internal override void buildsql()
		{
		}

		// Token: 0x060009AA RID: 2474 RVA: 0x00303B41 File Offset: 0x00301D41
		internal override void clear()
		{
		}

		// Token: 0x060009AB RID: 2475 RVA: 0x00303B43 File Offset: 0x00301D43
		internal override string getasprettytext()
		{
			return "";
		}

		// Token: 0x060009AC RID: 2476 RVA: 0x00303B4A File Offset: 0x00301D4A
		internal virtual void iterate(TVisitorAbs pvisitor)
		{
		}

		// Token: 0x170001B4 RID: 436
		// (get) Token: 0x060009AD RID: 2477 RVA: 0x00303B4C File Offset: 0x00301D4C
		// (set) Token: 0x060009AE RID: 2478 RVA: 0x00303B54 File Offset: 0x00301D54
		public virtual List<TTimingPoint> TimingPointList
		{
			get
			{
				return this.timingPointList;
			}
			set
			{
				this.timingPointList = value;
			}
		}

		// Token: 0x060009AF RID: 2479 RVA: 0x00303B60 File Offset: 0x00301D60
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			TCompoundTriggerBodyNode tcompoundTriggerBodyNode = (TCompoundTriggerBodyNode)this.rootNode;
			base.doParseStatement(psql);
			if (tcompoundTriggerBodyNode.DeclareStmts != null)
			{
				tcompoundTriggerBodyNode.DeclareStmts.doParse(this, ESqlClause.unknown);
				for (int i = 0; i < tcompoundTriggerBodyNode.DeclareStmts.size(); i++)
				{
					this.DeclareStatements.add(tcompoundTriggerBodyNode.DeclareStmts.getStatementSqlNode(i).Stmt);
				}
				for (int j = 0; j < tcompoundTriggerBodyNode.DeclareStmts.size(); j++)
				{
					this.TopStatement.SymbolTable.Push(new TSymbolTableItem(10, this, tcompoundTriggerBodyNode.DeclareStmts.getStatementSqlNode(j).Stmt));
				}
			}
			for (int k = 0; k < tcompoundTriggerBodyNode.TimingPointList.Count; k++)
			{
				tcompoundTriggerBodyNode.TimingPointList[k].doParse(this, ESqlClause.unknown);
			}
			this.timingPointList = tcompoundTriggerBodyNode.TimingPointList;
			if (tcompoundTriggerBodyNode.DeclareStmts != null)
			{
				for (int l = 0; l < tcompoundTriggerBodyNode.DeclareStmts.size(); l++)
				{
					this.TopStatement.SymbolTable.Pop();
				}
			}
			return 0;
		}

		// Token: 0x060009B0 RID: 2480 RVA: 0x00303C70 File Offset: 0x00301E70
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x060009B1 RID: 2481 RVA: 0x00303C80 File Offset: 0x00301E80
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x04001253 RID: 4691
		private List<TTimingPoint> timingPointList;
	}
}
